|
eeprom14 2.2.0
|
API for configuring and manipulating EEPROM 14 Click driver. More...
Topics | |
| EEPROM 14 Settings | |
| Settings of EEPROM 14 Click driver. | |
| EEPROM 14 MikroBUS Map | |
| MikroBUS pin mapping of EEPROM 14 Click driver. | |
Functions | |
| void | eeprom14_cfg_setup (eeprom14_cfg_t *cfg) |
| EEPROM 14 configuration object setup function. | |
| err_t | eeprom14_init (eeprom14_t *ctx, eeprom14_cfg_t *cfg) |
| EEPROM 14 initialization function. | |
| err_t | eeprom14_write_memory (eeprom14_t *ctx, uint16_t address, uint8_t *data_in, uint8_t len) |
| EEPROM 14 write memory function. | |
| err_t | eeprom14_read_memory (eeprom14_t *ctx, uint16_t address, uint8_t *data_out, uint16_t len) |
| EEPROM 14 read memory function. | |
| void | eeprom14_write_enable (eeprom14_t *ctx) |
| EEPROM 14 write-enable function. | |
| void | eeprom14_write_protect (eeprom14_t *ctx) |
| EEPROM 14 write-protect function. | |
API for configuring and manipulating EEPROM 14 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void eeprom14_cfg_setup | ( | eeprom14_cfg_t * | cfg | ) |
EEPROM 14 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See eeprom14_cfg_t object definition for detailed explanation. |
| err_t eeprom14_init | ( | eeprom14_t * | ctx, |
| eeprom14_cfg_t * | cfg ) |
EEPROM 14 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See eeprom14_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See eeprom14_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t eeprom14_read_memory | ( | eeprom14_t * | ctx, |
| uint16_t | address, | ||
| uint8_t * | data_out, | ||
| uint16_t | len ) |
EEPROM 14 read memory function.
This function reads a sequence of bytes from the device memory over I2C, starting at the selected 16-bit address. The read length must not exceed the page size and the transfer must not cross the device end address.
| [in] | ctx | : Click context object. See eeprom14_t object definition for detailed explanation. |
| [in] | address | : Start memory address (16-bit). |
| [out] | data_out | : Pointer to output data buffer. |
| [in] | len | : Number of bytes to read (max page size). |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void eeprom14_write_enable | ( | eeprom14_t * | ctx | ) |
EEPROM 14 write-enable function.
This function enables write operations by driving the WP pin low.
| [in] | ctx | : Click context object. See eeprom14_t object definition for detailed explanation. |
| err_t eeprom14_write_memory | ( | eeprom14_t * | ctx, |
| uint16_t | address, | ||
| uint8_t * | data_in, | ||
| uint8_t | len ) |
EEPROM 14 write memory function.
This function writes a sequence of bytes to the device memory over I2C, starting at the selected 16-bit address. The write length must not exceed the page size and the transfer must not cross the device end address.
| [in] | ctx | : Click context object. See eeprom14_t object definition for detailed explanation. |
| [in] | address | : Start memory address (16-bit). |
| [in] | data_in | : Pointer to input data buffer. |
| [in] | len | : Number of bytes to write (max page size). |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void eeprom14_write_protect | ( | eeprom14_t * | ctx | ) |
EEPROM 14 write-protect function.
This function disables write operations by driving the WP pin high.
| [in] | ctx | : Click context object. See eeprom14_t object definition for detailed explanation. |